package com.avic.rong.goodsSort.api.secondListApi;

import com.avic.rong.api.HttpPostService;
import com.example.minato.minastore.BaseApi;
import com.example.minato.minastore.listener.HttpOnNextListener;
import com.trello.rxlifecycle2.components.support.RxAppCompatActivity;

import io.reactivex.Observable;
import retrofit2.Retrofit;

/**
 * Created by Chenjiaxin on 2019/7/24 14:10
 * E-Mail Address：16601203965@163.com
 */
public class GoodsSortSearchAllWdSxApi extends BaseApi {

    //    private String state;
    private int types;
    private String keyword;
    private int catIds;
////    private String attrPro ;
//    private int typeId ;
//    private int sort;
//    private String postTime ;
//    private int pageNo ;
//    private int pageSize ;

    public GoodsSortSearchAllWdSxApi(RxAppCompatActivity rxAppCompatActivity, HttpOnNextListener listener, int types, int catIds, String keyword) {
        super(rxAppCompatActivity, listener);
        this.types = types;
        this.catIds = catIds;
        this.keyword = keyword;
    }

    @Override
    public Observable getObservable(Retrofit retrofit) {
        HttpPostService service = retrofit.create(HttpPostService.class);
//        if (state.equals("1"))
        return service.searchAllWdSx(types, catIds,keyword);
//        else
//            return service.searchAllWdTime(catIds, sort);
    }

}
